package com.lhfmqc.service;


import com.lhfmqc.dao.BookMapper;
import com.lhfmqc.pojo.Books;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;
import java.util.List;

/**
 * @author lhfmqc
 * @date 2021/10/1/001 15:35
 */
@Service
public class BookService {
    @Resource
    private BookMapper bookMapper;

    public void addBook(Books book){
       bookMapper.addBook(book);
    }
    public void deleteBookById(int id){
        bookMapper.deleteBookById(id);
    }
    public void updateBook(Books book){
        bookMapper.updateBook(book);
    }
    public Books queryBookById(int id){
        return bookMapper.queryBookById(id);
    }
    public List<Books> queryAllBook(){
        return bookMapper.queryAllBook();
    }
}
